<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻发布系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #0d6efd;
            --secondary-color: #6c757d;
            --accent-color: #198754;
            --light-bg: #f8f9fa;
            --border-color: #dee2e6;
            --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        }
        
        body {
            background-color: #f5f7fb;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #333;
        }
        
        .navbar {
            box-shadow: var(--shadow);
            background: linear-gradient(120deg, #0d6efd, #0b5ed7);
            padding: 0.8rem 1rem;
        }
        
        .navbar-brand {
            font-weight: 700;
            font-size: 1.5rem;
            color: white !important;
        }
        
        .navbar-nav .nav-link {
            color: rgba(255, 255, 255, 0.85) !important;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 0.25rem;
            transition: all 0.3s;
        }
        
        .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
            background-color: rgba(255, 255, 255, 0.15);
            color: white !important;
        }
        
        .card {
            border: none;
            border-radius: 0.5rem;
            box-shadow: var(--shadow);
            transition: transform 0.3s, box-shadow 0.3s;
            margin-bottom: 1.5rem;
            overflow: hidden;
        }
        
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        }
        
        .card-img-top {
            height: 200px;
            object-fit: cover;
            border-top-left-radius: 0.5rem;
            border-top-right-radius: 0.5rem;
        }
        
        .card-title {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.75rem;
            transition: color 0.3s;
        }
        
        .card-title:hover {
            color: #0b5ed7;
            text-decoration: underline;
        }
        
        .news-date {
            font-size: 0.85rem;
            color: var(--secondary-color);
            margin-bottom: 0.5rem;
        }
        
        .news-content-preview {
            color: #495057;
            line-height: 1.6;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .section-title {
            position: relative;
            padding-bottom: 0.75rem;
            margin-bottom: 1.5rem;
            font-weight: 600;
            color: #212529;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background-color: var(--primary-color);
            border-radius: 3px;
        }
        
        .pagination {
            margin-top: 2rem;
            justify-content: center;
        }
        
        .page-item.active .page-link {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        .page-link {
            color: var(--primary-color);
            border-radius: 0.25rem;
            margin: 0 0.25rem;
        }
        
        .admin-section {
            background-color: #fff;
            border-radius: 0.5rem;
            padding: 2rem;
            box-shadow: var(--shadow);
            margin-top: 2rem;
        }
        
        .admin-header {
            background-color: #e9f7fe;
            border-left: 4px solid var(--primary-color);
            padding: 1rem;
            margin-bottom: 1.5rem;
            border-radius: 0.25rem;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            padding: 0.5rem 1.5rem;
            font-weight: 500;
        }
        
        .btn-outline-primary {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        .btn-outline-primary:hover {
            background-color: var(--primary-color);
            color: white;
        }
        
        .action-buttons .btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
            margin-right: 0.5rem;
        }
        
        .news-detail {
            background-color: white;
            border-radius: 0.5rem;
            padding: 2rem;
            box-shadow: var(--shadow);
        }
        
        .news-detail-title {
            font-weight: 700;
            margin-bottom: 1rem;
            color: #212529;
        }
        
        .news-detail-meta {
            color: var(--secondary-color);
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .news-content {
            line-height: 1.8;
            font-size: 1.1rem;
        }
        
        .news-content img {
            max-width: 100%;
            height: auto;
            border-radius: 0.5rem;
            margin: 1.5rem 0;
        }
        
        footer {
            background: linear-gradient(120deg, #0d6efd, #0b5ed7);
            color: white;
            padding: 2rem 0;
            margin-top: 3rem;
        }
        
        .login-container {
            max-width: 500px;
            margin: 5rem auto;
            background: white;
            padding: 2.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        }
        
        .login-title {
            text-align: center;
            margin-bottom: 2rem;
            color: var(--primary-color);
            font-weight: 700;
        }
        
        .page-jump {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 1rem;
        }
        
        .page-jump input {
            width: 70px;
            margin: 0 0.5rem;
            text-align: center;
        }
        
        @media (max-width: 768px) {
            .navbar-nav {
                margin-top: 0.5rem;
            }
            
            .navbar-nav .nav-link {
                margin: 0.25rem 0;
            }
            
            .card-img-top {
                height: 180px;
            }
            
            .login-container {
                margin: 2rem auto;
                padding: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark sticky-top">
        <div class="container">
            <a class="navbar-brand" href="#"><i class="fas fa-newspaper me-2"></i>新闻发布系统</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link active" href="#"><i class="fas fa-home me-1"></i> 首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><i class="fas fa-list me-1"></i> 查看新闻</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#loginModal"><i class="fas fa-user-cog me-1"></i> 新闻管理</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#loginModal"><i class="fas fa-pen me-1"></i> 发布新闻</a>
                    </li>
                </ul>
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#loginModal"><i class="fas fa-sign-in-alt me-1"></i> 管理员登录</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 主要内容区 -->
    <div class="container my-5">
        <!-- 新闻列表 -->
        <div id="newsList">
            <h2 class="section-title">最新新闻</h2>
            
            <div class="row">
                <!-- 新闻卡片 1 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1495020689067-958852a7765e?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="科技新闻">
                        <div class="card-body">
                            <h5 class="card-title">人工智能技术取得重大突破，或将改变医疗行业</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-15</div>
                            <p class="news-content-preview">近日，某科技公司宣布其研发的新型人工智能算法在医疗影像诊断方面取得重大突破，准确率高达98.7%，远超人类专家水平...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
                
                <!-- 新闻卡片 2 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1507679799987-c73779587ccf?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="经济新闻">
                        <div class="card-body">
                            <h5 class="card-title">全球经济复苏迹象明显，主要股指持续上涨</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-14</div>
                            <p class="news-content-preview">随着各国逐步解除疫情限制措施，全球经济呈现明显复苏态势。主要经济体制造业PMI指数持续回升，消费者信心增强...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
                
                <!-- 新闻卡片 3 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1523580494863-6f3031224c94?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="教育新闻">
                        <div class="card-body">
                            <h5 class="card-title">教育部发布新政策，推动职业教育高质量发展</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-13</div>
                            <p class="news-content-preview">教育部近日印发《关于推动现代职业教育高质量发展的意见》，提出到2025年，职业本科教育招生规模不低于高等职业教育招生规模的10%...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
                
                <!-- 新闻卡片 4 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1517646287270-a5a9ca602e5c?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="体育新闻">
                        <div class="card-body">
                            <h5 class="card-title">国际足球锦标赛圆满落幕，我国代表队创历史最佳成绩</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-12</div>
                            <p class="news-content-preview">经过两周的激烈角逐，第25届国际足球锦标赛于昨日圆满结束。我国代表队在本届比赛中表现出色，最终获得季军，创造了历史最佳成绩...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
                
                <!-- 新闻卡片 5 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1469474968028-56623f02e42e?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="环境新闻">
                        <div class="card-body">
                            <h5 class="card-title">全球气候峰会达成新协议，各国承诺加大减排力度</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-11</div>
                            <p class="news-content-preview">为期两周的全球气候峰会于昨日闭幕，与会各国达成新的减排协议。根据协议，发达国家将在2030年前将温室气体排放量在2010年基础上减少55%...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
                
                <!-- 新闻卡片 6 -->
                <div class="col-md-6 col-lg-4">
                    <div class="card h-100">
                        <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&h=400&q=80" class="card-img-top" alt="科技新闻">
                        <div class="card-body">
                            <h5 class="card-title">新型量子计算机研发成功，计算速度提升百倍</h5>
                            <div class="news-date"><i class="far fa-clock me-1"></i> 2023-10-10</div>
                            <p class="news-content-preview">我国科研团队近日宣布成功研发出新一代量子计算机，其计算速度达到现有超级计算机的100倍以上，在多个领域展现出强大的应用潜力...</p>
                            <a href="#" class="btn btn-outline-primary mt-2">阅读全文</a>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 分页控件 -->
            <nav aria-label="新闻分页">
                <ul class="pagination">
                    <li class="page-item disabled">
                        <a class="page-link" href="#" tabindex="-1">上一页</a>
                    </li>
                    <li class="page-item active"><a class="page-link" href="#">1</a></li>
                    <li class="page-item"><a class="page-link" href="#">2</a></li>
                    <li class="page-item"><a class="page-link" href="#">3</a></li>
                    <li class="page-item"><a class="page-link" href="#">4</a></li>
                    <li class="page-item"><a class="page-link" href="#">5</a></li>
                    <li class="page-item">
                        <a class="page-link" href="#">下一页</a>
                    </li>
                </ul>
            </nav>
            
            <!-- 跳转页面 -->
            <div class="page-jump">
                <span>跳转到第</span>
                <input type="number" class="form-control" min="1" max="10" value="1" style="width: 70px;">
                <span>页</span>
                <button class="btn btn-primary ms-2">跳转</button>
            </div>
        </div>
        
        <!-- 新闻详情（隐藏） -->
        <div id="newsDetail" style="display: none;">
            <div class="news-detail">
                <h2 class="news-detail-title">人工智能技术取得重大突破，或将改变医疗行业</h2>
                <div class="news-detail-meta">
                    <span><i class="far fa-clock me-1"></i> 发布时间: 2023-10-15 09:30:45</span>
                    <span class="ms-3"><i class="fas fa-user me-1"></i> 发布者: 管理员</span>
                    <span class="ms-3"><i class="fas fa-eye me-1"></i> 阅读量: 1284</span>
                </div>
                <div class="news-content">
                    <img src="https://images.unsplash.com/photo-1495020689067-958852a7765e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&h=600&q=80" class="img-fluid rounded" alt="人工智能医疗">
                    <p>近日，某科技公司宣布其研发的新型人工智能算法在医疗影像诊断方面取得重大突破。该算法经过数百万张医疗影像数据的训练，在多种疾病的诊断准确率上达到了惊人的98.7%，远超人类专家平均92%的诊断准确率。</p>
                    
                    <p>该技术的核心是一种新型的深度学习模型，能够识别医学影像中人类肉眼难以察觉的细微特征。在临床试验中，该AI系统在肺癌早期筛查、乳腺癌诊断和糖尿病视网膜病变检测等多个领域表现出色。</p>
                    
                    <h5>技术特点</h5>
                    <ul>
                        <li>高精度：诊断准确率高达98.7%，假阴性率低于0.5%</li>
                        <li>高效率：单张影像分析时间仅需0.3秒</li>
                        <li>多病种支持：可同时检测多种疾病迹象</li>
                        <li>可解释性：提供诊断依据的可视化展示</li>
                    </ul>
                    
                    <p>该技术的研发团队负责人表示："我们的目标不是取代医生，而是为医生提供强大的辅助工具。在医疗资源紧张的地区，这项技术尤其具有重大意义，可以帮助提高诊断效率，让更多患者得到及时准确的诊断。"</p>
                    
                    <p>目前，该技术已经进入临床试验阶段，预计将在明年年初开始在医院试点应用。医疗专家普遍认为，这项技术有望大幅提高重大疾病的早期诊断率，挽救更多生命。</p>
                    
                    <p>随着人工智能技术的不断发展，其在医疗领域的应用前景广阔。除了医学影像诊断外，AI在药物研发、病理分析、个性化治疗方案制定等方面也展现出巨大潜力。</p>
                </div>
                <div class="mt-4">
                    <a href="#" class="btn btn-outline-primary"><i class="fas fa-arrow-left me-1"></i> 返回新闻列表</a>
                </div>
            </div>
        </div>
        
        <!-- 管理员功能区（隐藏） -->
        <div id="adminSection" style="display: none;">
            <div class="admin-header">
                <h3><i class="fas fa-cogs me-2"></i>新闻管理</h3>
                <p class="mb-0">您已以管理员身份登录，可进行新闻发布和管理操作</p>
            </div>
            
            <div class="d-flex justify-content-between mb-4">
                <h4>新闻列表</h4>
                <button class="btn btn-primary"><i class="fas fa-plus me-1"></i> 发布新闻</button>
            </div>
            
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead class="table-light">
                        <tr>
                            <th>ID</th>
                            <th>新闻标题</th>
                            <th>发布时间</th>
                            <th>阅读量</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>101</td>
                            <td>人工智能技术取得重大突破，或将改变医疗行业</td>
                            <td>2023-10-15</td>
                            <td>1284</td>
                            <td class="action-buttons">
                                <button class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</button>
                                <button class="btn btn-sm btn-outline-danger"><i class="fas fa-trash me-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td>100</td>
                            <td>全球经济复苏迹象明显，主要股指持续上涨</td>
                            <td>2023-10-14</td>
                            <td>986</td>
                            <td class="action-buttons">
                                <button class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</button>
                                <button class="btn btn-sm btn-outline-danger"><i class="fas fa-trash me-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td>99</td>
                            <td>教育部发布新政策，推动职业教育高质量发展</td>
                            <td>2023-10-13</td>
                            <td>754</td>
                            <td class="action-buttons">
                                <button class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</button>
                                <button class="btn btn-sm btn-outline-danger"><i class="fas fa-trash me-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td>98</td>
                            <td>国际足球锦标赛圆满落幕，我国代表队创历史最佳成绩</td>
                            <td>2023-10-12</td>
                            <td>1542</td>
                            <td class="action-buttons">
                                <button class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</button>
                                <button class="btn btn-sm btn-outline-danger"><i class="fas fa-trash me-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td>97</td>
                            <td>全球气候峰会达成新协议，各国承诺加大减排力度</td>
                            <td>2023-10-11</td>
                            <td>832</td>
                            <td class="action-buttons">
                                <button class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</button>
                                <button class="btn btn-sm btn-outline-danger"><i class="fas fa-trash me-1"></i>删除</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            
            <div class="d-flex justify-content-between mt-4">
                <button class="btn btn-outline-secondary"><i class="fas fa-sign-out-alt me-1"></i> 管理员退出</button>
                <nav aria-label="管理分页">
                    <ul class="pagination mb-0">
                        <li class="page-item disabled"><a class="page-link" href="#">上一页</a></li>
                        <li class="page-item active"><a class="page-link" href="#">1</a></li>
                        <li class="page-item"><a class="page-link" href="#">2</a></li>
                        <li class="page-item"><a class="page-link" href="#">3</a></li>
                        <li class="page-item"><a class="page-link" href="#">下一页</a></li>
                    </ul>
                </nav>
            </div>
        </div>
        
        <!-- 发布新闻（隐藏） -->
        <div id="addNews" style="display: none;">
            <div class="admin-header">
                <h3><i class="fas fa-pen me-2"></i>发布新闻</h3>
                <p class="mb-0">请填写新闻信息，发布时间将自动设置为当前系统时间</p>
            </div>
            
            <form>
                <div class="mb-3">
                    <label for="newsTitle" class="form-label">新闻标题</label>
                    <input type="text" class="form-control" id="newsTitle" placeholder="请输入新闻标题">
                </div>
                <div class="mb-3">
                    <label for="newsContent" class="form-label">新闻内容</label>
                    <textarea class="form-control" id="newsContent" rows="10" placeholder="请输入新闻内容"></textarea>
                </div>
                <div class="mb-3">
                    <label for="newsImage" class="form-label">新闻图片</label>
                    <input class="form-control" type="file" id="newsImage">
                </div>
                <div class="d-flex justify-content-end mt-4">
                    <button type="reset" class="btn btn-outline-secondary me-2">重置</button>
                    <button type="submit" class="btn btn-primary">发布新闻</button>
                </div>
            </form>
        </div>
    </div>

    <!-- 登录模态框 -->
    <div class="modal fade" id="loginModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><i class="fas fa-user-lock me-2"></i>管理员登录</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <form>
                        <div class="mb-3">
                            <label for="username" class="form-label">用户名</label>
                            <input type="text" class="form-control" id="username" placeholder="请输入管理员用户名">
                        </div>
                        <div class="mb-3">
                            <label for="password" class="form-label">密码</label>
                            <input type="password" class="form-control" id="password" placeholder="请输入密码">
                        </div>
                        <div class="mb-3 form-check">
                            <input type="checkbox" class="form-check-input" id="remember">
                            <label class="form-check-label" for="remember">记住我</label>
                        </div>
                        <div class="d-grid">
                            <button type="submit" class="btn btn-primary">登录</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-md-4 mb-4 mb-md-0">
                    <h5 class="mb-3"><i class="fas fa-newspaper me-2"></i>新闻发布系统</h5>
                    <p class="mb-0">提供最新、最全面的新闻资讯，涵盖科技、经济、教育、体育、环境等多个领域。</p>
                </div>
                <div class="col-md-4 mb-4 mb-md-0">
                    <h5 class="mb-3">快速链接</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-white">首页</a></li>
                        <li><a href="#" class="text-white">查看新闻</a></li>
                        <li><a href="#" class="text-white">关于我们</a></li>
                        <li><a href="#" class="text-white">联系方式</a></li>
                    </ul>
                </div>
                <div class="col-md-4">
                    <h5 class="mb-3">联系我们</h5>
                    <ul class="list-unstyled">
                        <li><i class="fas fa-map-marker-alt me-2"></i> 北京市海淀区科技园区88号</li>
                        <li><i class="fas fa-phone me-2"></i> 010-12345678</li>
                        <li><i class="fas fa-envelope me-2"></i> info@news-system.com</li>
                    </ul>
                </div>
            </div>
            <hr class="my-4" style="background-color: rgba(255,255,255,0.2);">
            <div class="text-center">
                <p class="mb-0">© 2023 新闻发布系统 版权所有</p>
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 模拟管理员登录
        document.querySelectorAll('[data-bs-target="#loginModal"]').forEach(element => {
            element.addEventListener('click', function() {
                // 实际项目中这里会有登录验证逻辑
                console.log("打开登录窗口");
            });
        });
        
        // 模拟查看新闻详情
        document.querySelectorAll('.card-title, .btn-outline-primary').forEach(element => {
            element.addEventListener('click', function(e) {
                e.preventDefault();
                document.getElementById('newsList').style.display = 'none';
                document.getElementById('newsDetail').style.display = 'block';
            });
        });
        
        // 模拟返回新闻列表
        document.querySelector('.news-detail .btn-outline-primary').addEventListener('click', function(e) {
            e.preventDefault();
            document.getElementById('newsDetail').style.display = 'none';
            document.getElementById('newsList').style.display = 'block';
        });
        
        // 模拟管理员功能
        document.querySelectorAll('.nav-link[data-bs-target="#loginModal"]').forEach(element => {
            element.addEventListener('click', function() {
                // 在实际项目中，登录成功后才会显示管理员区域
                // 这里仅为演示
                setTimeout(() => {
                    if (element.textContent.includes('新闻管理')) {
                        document.getElementById('newsList').style.display = 'none';
                        document.getElementById('adminSection').style.display = 'block';
                    } else if (element.textContent.includes('发布新闻')) {
                        document.getElementById('newsList').style.display = 'none';
                        document.getElementById('addNews').style.display = 'block';
                    }
                }, 500);
            });
        });
    </script>
</body>
</html>